package com.cmit.inter.cdrrating.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cmit.inter.cdrrating.model.SettlementRatio451;
import com.cmit.inter.cdrrating.mapper.SettlementRatio451Mapper;
import com.cmit.inter.cdrrating.service.SettlementRatio451Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.apache.commons.lang3.StringUtils;

import java.util.List;
/**
 * <p>
 * 黑龙江摊分表 服务实现类
 * </p>
 *
 * @author zhoushuang
 * @since 2021-03-26
 */
@Service
@Transactional
public class SettlementRatio451ServiceImpl extends ServiceImpl<SettlementRatio451Mapper, SettlementRatio451> implements SettlementRatio451Service {

    @Autowired
    private SettlementRatio451Mapper settlementRatio451Mapper;

    @Override
    public IPage<SettlementRatio451> selectPage(Page<SettlementRatio451> page, SettlementRatio451 settlementRatio451) {
        QueryWrapper<SettlementRatio451> queryWrapper = new QueryWrapper<SettlementRatio451>();
        getQueryWrapper(queryWrapper,settlementRatio451);
        return settlementRatio451Mapper.selectPage(page,queryWrapper);
    }

    @Override
    public List<SettlementRatio451> selectList(SettlementRatio451 settlementRatio451) {
        QueryWrapper<SettlementRatio451> queryWrapper = new QueryWrapper<SettlementRatio451>();
        getQueryWrapper(queryWrapper,settlementRatio451);
        return settlementRatio451Mapper.selectList(queryWrapper);
    }

    /**
     *  公共查询条件
     * @param queryWrapper
     * @return
     */
    public QueryWrapper<SettlementRatio451> getQueryWrapper(QueryWrapper<SettlementRatio451> queryWrapper,SettlementRatio451 settlementRatio451){
        //条件拼接
    
        return queryWrapper;
    }
}
